//
//  MyDetailsConteroller.m
//  基本框架
//
//  Created by runone02 on 2018/7/2.
//  Copyright © 2018年 liqiyun. All rights reserved.
//

#import "MyDetailsConteroller.h"
#import "MyDetailsView.h"
#import "SetupViewController.h"
@interface MyDetailsConteroller ()
@property (nonatomic, strong) MyDetailsView * mainView;
@end

@implementation MyDetailsConteroller

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupNavView];
    [self setupMainView];
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
}

- (void) setupNavView{
    [super setupNavView];
    self.navView.backgroundColor = [UIColor clearColor];
    self.navView.showBottomLabel = NO;
    [self.navView.rightButton setImage:IMAGE(@"personal_setting") forState:UIControlStateNormal];

    [self.navView.leftButton setImage:backArrowIcon forState:UIControlStateNormal];
    
    [self.navView.rightButton addTarget:self action:@selector(clickSetup) forControlEvents:UIControlEventTouchUpInside];
}

- (void)setupMainView{
    self.mainView = [[MyDetailsView alloc] initWithFrame:CGRectMake(0, 0 + KStatusBarHeight, kScreenWidth, kScreenHeight - KTabBarHeight)];
    [self.view addSubview:self.mainView];
    [self.view insertSubview:self.mainView belowSubview:self.navView];
}

#pragma mark - 设置
- (void)clickSetup{
    SetupViewController *vc = [[SetupViewController alloc] init];
    [self.navigationController pushViewController:vc animated:YES];
}
@end
